<div class="box">

  <div class="box-header">
    <div class="row">
        <div class="col-sm-5">
            <ob_link><a class="btn export" url="{:url('exportOrderList')}"><i class="fa fa-download"></i> 导 出</a></ob_link>
        </div>
        <div class="col-sm-8">
            <div class="box-tools search-form pull-right">
                <div class="input-group input-group-sm">
                    
                    <input type="text" name="search_data" style="width: 200px;" class="form-control pull-right" value="{:input('search_data')}" placeholder="支持用户名|姓名|订单号">
					<select name="pay" class="pull-right form-control" style="width:120px">
						<option value="" >支付方式</option>
						<option value='1'>积分支付</option>
						<option value='2'>余额支付</option>
                        <option value='3'>消费券支付</option>
                        <option value='4'>微信支付</option>
                        <option value='5'>支付宝支付</option>
					</select>
					<select name="stat" class="pull-right form-control" style="width:120px">
						<option value="9" >发货状态</option>
						<option value='0'>未发货</option>
						<option value='1'>已发货</option>
						<option value='2'>已确认收货</option>
					</select>
                    <div class="input-group-btn">
                      <button type="button" id="search"  url="{:url('orderList')}" class="btn btn-info btn-flat"><i class="fa fa-search"></i></button>
                    </div>

                </div>
           </div>
        </div>
    </div>

  </div>
  <div class="box-body table-responsive">
    <table  class="table table-bordered table-hover table-striped">
      <thead>
      <tr>
		  <th>订单号</th>
		  <th>用户</th>
          <th>商品名</th>
		  <th>支付方式</th>
		  <th>订单总价</th>
		  <th>商品单价</th>
          <th>购买数量</th>
          <th>支付时间</th>
		  <th>状态</th>
          <th>操作</th>
      </tr>
      </thead>
      
      {notempty name='list'}
        <tbody>
            {volist name='list' id='vo'}
                <tr>
				  <td>{$vo.order_sn}</td>
                  <td>{$vo.username}<br/><span style="color:red">{$vo.name}</span></td>
				  <td>{$vo.title}</td>
				  <td>{$vo.pay|getPay}</td>
                  <td>{$vo.money}</td>
				  <td>{$vo.danjia}</td>
				  <td>{$vo.num}</td>
				  <td>{$vo.zf_time}</td>
				  <td>{if $vo.stat == 0}<span style="color:red">待发货</span>{/if}{if $vo.stat == 1}已发货{/if}{if $vo.stat == 2}确认收货{/if}</td>
                  <td class="col-md-2 text-center">
                      {if $vo.stat == 0}<ob_link><a href="{:url('cxOrder', array('id' => $vo['ids']))}" class="btn confirm ajax-get "><i class="fa fa-edit"></i> 撤销订单</a></ob_link>&nbsp;&nbsp;<ob_link><a href="{:url('fahuo', array('id' => $vo['id']))}" class="btn "><i class="fa fa-edit"></i> 发货</a></ob_link>{/if}
                      {if $vo.stat == 1}<ob_link><a class="btn confirm ajax-get" href="{:url('qrsh', array('id' => $vo['id']))}" class="btn "><i class="fa fa-edit"></i> 确认收货</a></ob_link>{/if}
                  </td>
                </tr>
            {/volist}
        </tbody>
        {else/}
        <tbody><tr class="odd"><td colspan="8" class="text-center" valign="top">{:config('empty_list_describe')}</td></tr></tbody>
      {/notempty}
    </table>
      
    {include file="layout/batch_btn_group"/}
  </div>
  <div class="box-footer clearfix text-center">
      {$list->render()}
  </div>
    <script>
        //导出功能
        $(".export").click(function(){
            window.location.href = searchFormUrl($(".export"));
        });
    </script>
</div>